<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>全局注册和局部注册</title>
    <script src="../../js/vue.js" type="text/javascript"></script>
</head>
<body>
<div id="root">
    <global-com></global-com>
    <part-com></part-com>
</div>
<script>
    window.onload = () => {
        Vue.component("global-com", {
            template: `
                <h1>global</h1>
            `
        });
        var PartCom = {
            template: `
                <h1>part</h1>
            `
        }
        let vm = new Vue({
            el: '#root',
            components:{
                'part-com':PartCom
            }
        });
    }
</script>
</body>
</html>